<!--
@description: 费用登记
@creationTime: 2023-10-01
-->

<route type="page" lang="json5">
{
  layout: 'default',
  style: {
    navigationBarTitleText: '操作日志'
  }
}
</route>
<template>
  <view>
    <wd-form :model="formData" ref="formRef" border>
      <view class="flex flex-justify-between m-3 box-border flex-items-center">
        <text class="text-lg font-size-3 font-800">操作日志</text>
      </view>
      <wd-card>
        <wd-input
          label="箱库"
          prop="value"
          v-model="formData.value"
          :rules="[{ required: true, message: '请输入箱库' }]"
        />
        <wd-input
          label="描述"
          prop="description"
          v-model="formData.description"
          :rules="[{ required: true, message: '请输入描述' }]"
        />
        <wd-input
          label="工时"
          prop="time"
          v-model="formData.time"
          :rules="[{ required: true, message: '请输入工时' }]"
        />
      </wd-card>
      <wd-card>
        <wd-cell label="完成进度" prop="progress" :vertical="true" custom-class="p-0! m-0!">
          <wd-slider
            label="完成进度"
            prop="progress"
            :hide-min-max="true"
            v-model="formData.progress"
            type="number"
            :rules="[{ required: true, message: '请输入完成进度' }]"
          />
        </wd-cell>
      </wd-card>
      <wd-card>
        <wd-cell label="图片" prop="image" :vertical="true" custom-class="p-0! m-0!">
          <wd-upload
            label="图片"
            prop="image"
            v-model="formData.image"
            :rules="[{ required: true, message: '请上传图片' }]"
          />
        </wd-cell>
      </wd-card>
      <view class="my-3 mx-2">
        <wd-button type="primary" @click="submit">提交</wd-button>
      </view>
    </wd-form>
  </view>
</template>

<script lang="ts" setup>
import { ref } from 'vue'

const formData = ref({
  value: '冰鲜库',
  description: '',
  time: '',
  image: '',
  progress: 0
})

const submit = () => {
  // 提交逻辑
}
</script>

<style lang="scss" scoped></style>
